package com.uphone.kingmall.activity;

import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.lzy.okgo.model.HttpParams;
import com.uphone.kingmall.adapter.YourLikeListAdapter;
import com.uphone.kingmall.base.BaseListActivity;
import com.uphone.kingmall.bean.GoodsListBean;
import com.uphone.kingmall.utils.CommonUtil;
import com.uphone.kingmall.utils.MyUrl;

/**
 * <pre>
 *     author : radish
 *     e-mail : 15703379121@163.com
 *     time   : 2019/3/18
 *     desc   :
 * </pre>
 */
public class YourLikeListActivity extends BaseListActivity<GoodsListBean, GoodsListBean.DataBean> {

    @Override
    protected String initTitle() {
        return "猜你喜欢";
    }

    @Override
    protected void itemClick(BaseQuickAdapter adapter, View view, int position) {
        CommonUtil.startIntent(this, GoodsDetailActivity.class, dataList.get(position).getGoodsId());
    }

    @Override
    protected BaseQuickAdapter initAdapter() {
        return new YourLikeListAdapter(this);
    }

    @Override
    protected GoodsListBean getBeans() {
        return new GoodsListBean();
    }

    @Override
    protected HttpParams getParams() {
        HttpParams params = new HttpParams();
        params.put("page", page);
        params.put("limit", "10");
        params.put("orderby", "1");
        params.put("asc", "2");
        return params;
    }

    @Override
    protected String getUrl() {
        return MyUrl.getYourLikes;
    }
}
